<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/vue.js"></script>
</head>
<body>
<div id="bind">
    <!--如何让img标签中src属性引用vue对象中的数据-->
    <img v-bind:src="imgUrl"  width="200" v-bind:title="title" v-bind:class="flag?'a':''"/><br>

    <!--v-bind: 缩写为: -->
    <img :src="imgUrl"  width="200" :title="title" :class="flag?'a':''"/><br>

    <button @click="fun">点击</button>
</div>
</body>
<script>
    let bind=new Vue({
        el:"#bind",
        data:{
            age:18,
            imgUrl:"图片切换/images/logo.png",
            title:"111",
            flag:true
        },
        methods:{
            fun(){
                this.imgUrl="图片切换/images/10.jpg";
                this.title="美女好看"
            }
        }
    })
</script>
</html>